<template>
	<view style="margin-top: 10px;">
		
		<image :src="HTTP_IMG_UTL+'/car.png'" class="car_img" v-if="is_type==0" :class="left_style"></image>
		
		<image :src="HTTP_IMG_UTL+'/car.png'" class="car_img2" v-if="is_type==1" :class="left_style"></image>
		
		<view style="display: flex;width: 100%;">
			<view class="circle1" v-if="!transport_step.id">
				<view class="circle_dian1">·</view>
			</view>
			<view class="circle" v-else>
				<view class="circle_dian">·</view>
			</view>
			
			<view style="display: flex;" v-if="loading==true" v-for="(item,index) in tableData"  :key="index" :class="is_short==0?'qc':'dc'">
				
				<view class="line_process" style="width: 100%;" v-if="step>=item.id"></view>
				<view class="line_process1" style="width: 100%;" v-else-if="step!=item.id"></view>
				<view class="circle" v-if="step>=item.id">
					<view class="circle_dian"  v-if="step>=item.id">·</view>
					<view class="circle_dian1"  v-if="step<item.id">·</view>
				</view>
				<view class="circle1" v-else-if="step<item.id">
					<view class="circle_dian"  v-if="step>=item.id">·</view>
					<view class="circle_dian1"  v-if="step<item.id">·</view>
				</view>
			
			</view>
			
		</view>
		<view style="display: none;">{{leixing}}</view>
		
	</view>
</template>

<script>
	import {
		HTTP_REQUEST_URL,
		HTTP_IMG_UTL,
		IMAGE_URL
	} from "@/config/app";
	export default {
		props: {
			step: {
				type: [Number, String,null],
				default: ''
			},
			is_type: {
				type: [Number, String,null],
				default: 0
			},
			is_short: {
				type: [Number, String,null],
				default: 0
			},
			transport_step: {
				type: [Array,Object,null],
				default: () => ({})
			},
			leixing: {
				type: [Number, String,null],
				default: Math.floor(Math.random() * 100) + 1
			},
		},
		data() {
			return {
				HTTP_IMG_UTL,
				left_style:'',
				loading:false,
				tableData:[],
				list:[ {id:25},{id:50},{id:75},{id:100}],
				lists:[{id:10},{id:20},{id:30},{id:40},{id:50},{id:60},{id:70},{id:80},{id:90},{id:100}],
			}
		},
		mounted() {
			console.log(this.transport_step);
			if(this.is_short==0){
				this.tableData = this.lists
				if(this.step==''){ this.left_style = '' }
				if(this.step==10){ this.left_style = 'left_10' }
			}else{
				this.tableData = this.list
				if(this.step==''){ this.left_style = '' }
				if(this.step==10){ this.left_style = '' }
			}
			
			if(this.step==20){ this.left_style = 'left_20' }
			if(this.step==25){ this.left_style = 'left_25' }
			if(this.step==30){ this.left_style = 'left_30' }
			if(this.step==40){ this.left_style = 'left_40' }
			if(this.step==50){ this.left_style = 'left_50' }
			if(this.step==60){ this.left_style = 'left_60' }
			if(this.step==70){ this.left_style = 'left_70' }
			if(this.step==75){ this.left_style = 'left_75' }
			if(this.step==80){ this.left_style = 'left_80' }
			if(this.step==90){ this.left_style = 'left_90' }
			if(this.step==100){ this.left_style = 'left_100' }
			this.loading = true
		},
		methods: {
			
		}
	}
</script>
<style lang="scss" scoped>
	@import "@/common/orderDetail.scss";
	.car_img{ width: 50rpx;height: 45rpx;top: 0;left: 0;position: relative; }
	.car_img2{ width: 50rpx;height: 45rpx;top: -25px;left: 0;position: absolute; }
	.left_10{ left:10% !important }
	.left_20{ left:20% !important }
	.left_25{ left:25% !important }
	.left_30{ left:30% !important }
	.left_40{ left:40% !important }
	.left_50{ left:50% !important }
	.left_60{ left:60% !important }
	.left_70{ left:70% !important }
	.left_75{ left:75% !important }
	.left_80{ left:80% !important }
	.left_90{ left:90% !important }
	.left_100{ left:95% !important }
	.dc{
		width:25%
	}
	.qc{
		width:10%
	}
</style>
